package com.zjhome.cloudnote.constant;

import lombok.Getter;

/**
 * 错误枚举表
 * 
 * @return
 */
@Getter
public enum ErrorCode {
	
	ERR_NORMAL(0, "操作完成"),
	
	/**
	 * 登陆类错误
	 */
	ERR_TOKEN			(1001000, "token错误"),	
	ERR_TOKEN_INVALID	(1001000, "无效的token"),
	ERR_TOKEN_EXPIRE	(1001001, "token过期"),
		
	/**
	 * 注册类错误
	 */
	ERR_REGISTER			(100200, "注册错误"),
	ERR_REG_USER_EXISTS	(100201, "用户已经存在"),
	
	
	/**
	 * 用户类错误
	 */
	ERR_USER		(100300, "用户错误"),
	ERR_OLD_PSWD	(100301, "旧密码不正确"),
	ERR_DIFF_PSWD	(100302, "密码两次输入不一致"),
	
	
	/**
	 * 文件夹错误
	 */
	ERR_DIR(100400, "文件夹错误"),
		
	
	/**
	 * 笔记类错误
	 */
	ERR_NOTE(100500, "笔记错误"),
	
	
	
	/**
	 * 通用错误
	 */	
	ERR_INVALID_ID(900101, "非法的id"),
	
	
	
	ERR_MAX(999999, "");
	
	
	
	/**
	 * 错误码
	 */
	private int 	code;
	/**
	 * 错误描述
	 */
	private String 	remark;
	
	private ErrorCode(int code, String remark) {
		this.code = code;
		this.remark = remark;
	}
	
	
	
}
